import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:'/login',
      component:() => import('@/views/login.vue'),
      name: 'login'
    }
    ,
    {
       path:'/',
       redirect: '/login'
    },
    {
      path: '/home',
      name: 'home',
      component: () => import ('@/views/home.vue')
    },
    {
      path: '/contact',
      name: 'contact',
      component: () => import ('@/views/contact.vue')
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('@/views/register.vue')
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('@/views/about.vue')
    },
    {
      path: '/forgot',
      name: 'forgot',
      component: () => import('@/views/forgot.vue')
    },
    {
      path: '/payment',
      name: 'pay',
      component: () => import('@/views/pay.vue')
    },
    {
      path: '/wechat',
      name: 'wechat',
      component: () => import('@/views/payment.vue')
    },
    {
      path: '/setting',
      component: () => import('@/views/setting.vue')
    },
    {
      path: '/history',
      component: () => import('@/views/history.vue')
    },
    {
      path: '/adminLogin',
      component: () => import('@/views/login2.vue')
    },
    {
      path: '/admin',
      name: 'admin',
      component: () => import('@/views/admin.vue')
    }   
  ]
})

export default router
